const path = require('path')
const FileManagerPlugin = require('filemanager-webpack-plugin')

module.exports = {
	mode: 'production',
    entry: path.resolve(__dirname, './src/main.js'),
    plugins: [
		new FileManagerPlugin({
			// 注意！记得这里需要加一层events节点，否则会报错噢，宝
			events: {
				onEnd: {
					delete: [
						'./dist.zip',
					],
					archive: [{
						source: './dist',
						destination: './dist.zip'
					}]
				}
			}
		})
	]
};